package com.nidu.demo.common.enums;

import cn.hutool.core.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum BooleanEnum {
    FALSE(false, "否"),
    TRUE(true, "是");

    private final Boolean value;
    private final String desc;
    
    public static BooleanEnum of(Boolean value) {
        return ArrayUtil.firstMatch(o -> o.getValue().equals(value), values());
    }
} 